<!-- @author Shiyn/   huangmx 20200807优化-->
<template>
  <div class="top-right-btn">
    <el-row>
      <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏筛选' : '高级筛选'" placement="top">
        <el-button size="mini" circle  @click="toggleSearch()" >
          <template v-if="showSearch">
            隐藏筛选
          </template>
          <template v-else="showSearch">
            高级筛选
          </template>
        </el-button>
      </el-tooltip>
      <el-tooltip class="item" effect="dark" content="刷新数据" placement="top">
        <el-button size="mini" circle icon="el-icon-refresh" @click="refresh()" />
      </el-tooltip>
    </el-row>
  </div>
</template>
<script>
  export default {
    name: "RightToolbar",
    data() {
      return {};
    },
    props: {
      showSearch: {
        type: Boolean,
        default: true,
      },
    },

    methods: {
      //查询
      toggleSearch() {
        this.$emit("update:showSearch", !this.showSearch);
      },
      //刷新
      refresh() {
        this.$emit("queryTable");
      },
    },
  };
</script>
